package com.fd.dx.mapper;

import com.fd.dx.domain.ST;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * 关于水田的增删改查
 */
@Mapper
public interface STMapper {
    /**
     * 查找水田信息
     * @return
     */
    @Select("select gid,objectid,id,ruleid,shape_leng,shape_area,ST_AsGeoJSON(geom) geom,name,intr from public.st where objectid=#{id};")
    public ST getSTInfo(Integer id);

    /**
     * 修改水田信息
     * @return
     */
    @Update("UPDATE public.st SET name=#{name},intr=#{intr} WHERE objectid=#{objectid}")
    public Integer updateSTInfo(ST st);
}
